package it.polimi.reTraveldream.entities;

import java.io.Serializable;

import it.polimi.reTravelDream.dto.CityDTO;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;


/**
 * Entity implementation class for Entity: City
 *
 */
@Entity
@Table(name="city")
@NamedQueries({
	@NamedQuery(name=City.FIND_ALL,
            query="SELECT c FROM City c")	
})
public class City implements Serializable {

	
	private static final long serialVersionUID = 1L;
	public static final String FIND_ALL="City.findAll"; 
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Long id;
	private String city;
	
	public City() {
	}	
	
	public City(CityDTO cityToAdd) {
		super();
		this.city=cityToAdd.getCity();
	}

	

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}
   
}
